﻿@model Orchard.Layers.ViewModels.LayerMetadataEditViewModel

<fieldset class="form-group" asp-validation-class-for="LayerMetadata.Title">
    <label asp-for="LayerMetadata.Title">@T["Title"] <span asp-validation-for="LayerMetadata.Title"></span></label>
    <input asp-for="LayerMetadata.Title" class="form-control" type="text" />
</fieldset>

<fieldset class="form-check">
    <label class="form-check-label">
        <input asp-for="LayerMetadata.RenderTitle" type="checkbox" class="form-check-input content-preview-select" checked="@Model.LayerMetadata.RenderTitle" /> @T["Render title"]
        <span class="hint">@T["— If checked, the title will be rendered with the widget."]</span>
    </label>
</fieldset>

<fieldset class="form-group">
    <label asp-for="LayerMetadata.Layer">@T["The layer the widget should be associated with."]</label>
    <select asp-for="LayerMetadata.Layer" class="form-control">
        @foreach (var layer in Model.Layers)
        {
            <option value="@layer.Name" selected="@(Model.LayerMetadata.Layer == layer.Name)">@layer.Name</option>}
    </select>
</fieldset>

<input asp-for="LayerMetadata.Zone" type="hidden" />
<input asp-for="LayerMetadata.Position" type="hidden" />
